#include <iostream>
#include <fstream>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <numeric>
#include <vector>
#include <iterator>
#include <functional>
//#include <boost/bind.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/timer.hpp>
#include <boost/shared_ptr.hpp>

using namespace std;
using namespace boost::lambda;

int main(int atrgc, char** argv)
{
	vector<int> V1,V2,V3,V4,V5;
	for(int i=0;i<20;++i)
		V1.push_back(i);

	V3.insert(V3.begin(),V1.begin(),V1.end());
	V4.assign(V1.begin(),V1.end());

	remove_copy_if(V1.begin(),V1.end(),back_inserter(V2),_1>5);
	V1.swap(V2);
	copy(V1.begin(),V1.end(),ostream_iterator<int>(cout," "));
	cout<<endl;

	V3.erase( remove_if(V3.begin(),V3.end(),_1>10), 
		  V3.end());
	copy(V3.begin(),V3.end(),ostream_iterator<int>(cout," "));
	cout<<endl;

	return 0;
}
